<?php

namespace common\models;

use common\components\active\ActiveRecord;
use Yii;

/**
 * This is the model class for table "enterprise".
 *
 * @property int    $enterprise_id
 * @property string $enterprise_name                     企业名称
 * @property string $enterprise_business_licence         营业执照
 * @property string $enterprise_organization_code        组织机构代码
 * @property array  $enterprise_business_licence_images  营业执照图片
 * @property array  $enterprise_organization_code_images 组织机构代码图片
 */
class Enterprise extends ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'enterprise';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['enterprise_name', 'enterprise_business_licence', 'enterprise_organization_code'], 'required'],
            [['enterprise_business_licence_images', 'enterprise_organization_code_images'], 'string'],
            [['enterprise_name', 'enterprise_business_licence', 'enterprise_organization_code'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'enterprise_id'                       => 'Enterprise ID',
            'enterprise_name'                     => '企业名称',
            'enterprise_business_licence'         => '营业执照',
            'enterprise_organization_code'        => '组织机构代码',
            'enterprise_business_licence_images'  => '营业执照图片',
            'enterprise_organization_code_images' => '组织机构代码图片',
        ];
    }


}
